package edu.ucdavis.gwt.gis.client.toolbar.button;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.Image;

import edu.ucdavis.gwt.gis.client.resources.GadgetResources;
import edu.ucdavis.gwt.gis.client.state.LoadPopup;
import edu.ucdavis.gwt.gis.client.toolbar.Toolbar;

public class LoadButton extends ToolbarItem {

	
	public LoadButton() {}

	@Override
	public Image getIcon() {	
		return new Image(GadgetResources.INSTANCE.load());
	}

	@Override
	public void onAdd(Toolbar toolbar) {}

	@Override
	public void onClick(ClickEvent event) {
		LoadPopup.INSTANCE.center();
	}

	@Override
	public String getText() {
		return "Load Map";
	}

}
